package com.tang.reggie.common;

import lombok.Data;

import java.io.Serializable;

@Data
public class R implements Serializable {
    private Integer code;
    private Object data;
    private String msg;

    public static R success(Object data){
        R r = new R();
        r.setCode(1);
        r.setData(data);
        return r;
    }
    public static R error(String msg){
        R r = new R();
        r.setCode(0);
        r.setMsg(msg);
        return r;
    }
}
